<?php

namespace RSP\UserBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class UserEcoleType extends AbstractType {

    public function buildForm(FormBuilderInterface $builder, array $options) {
        $builder
                ->add('ecole')
                ->add('date_debut', 'date', array(
                    'widget' => 'single_text',
                    'format' => 'dd-MM-yyyy'))
                ->add('date_fin', 'date', array(
                    'widget' => 'single_text',
                    'format' => 'dd-MM-yyyy'))
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver) {
        $resolver->setDefaults(array(
            'data_class' => 'RSP\UserBundle\Entity\UserEcole'
        ));
    }

    public function getName() {
        return 'rsp_userbundle_userecoletype';
    }

}
